<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>忘记密码</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/index.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/style_reg.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>

<style type="text/css">
#usernameForm dl {
    float: left;
    padding: 5px 0;
    width: 600px;
}
#usernameForm dt {
    float: left;
    font-size: 14px;
    font-weight: bold;
    padding-right: 10px;
    text-align: right;
    width: 50px;
}
#usernameForm dd {
    float: left;
    position: relative;
}
</style>

<script type="text/javascript">
	$(document).ready(function(){
	  	$("#usernameForm").validate({
		  	rules : {
		  		"usernameCheck" : {
		  			required : true,
		  			remote : {
		  				url : "${pageContext.request.contextPath}/user/ajaxCheckExist.action",
		  				type : "post"
					}
		  		},
		  		"verifyCode" : {
		  			required : true
		  		}
		  	},
		  	messages : {
		  		"usernameCheck" : {
		  			required : "请输入用户名",
		  			remote : "该用户名不存在，请输入正确的用户名"
		  		},
		  		"verifyCode" : {
		  			required : "请输入验证码"
		  		}
		  	}
	  	});
	  });
</script>

</head>

<body>	
	<div>
		<jsp:include page="/header.jsp"></jsp:include>
	</div>

	<div id="StepOne" style="margin-top:50px; width:300px; display:block; margin-left:auto; margin-right:auto;">
		<div style="color:red; font-size:15px;"><s:property value="resultMsg"/><s:fielderror></s:fielderror></div>
		<h1>请输入您的运策网用户名：</h1>
		<form method="post" id="usernameForm" name="usernameForm" action="/huoyun/user/checkExist.action">
			<dl>
				<dt>
					<label for="usernameCheck">
						用户名:
					</label>
				</dt>
				<dd>
					<input type="text" name="usernameCheck" id="usernameCheck" class="inputtext" />
				</dd>
			</dl>
			<dl>
				<dt>
					<label for="verifyCode">
						验证码:
					</label>
				</dt>
				<dd>
					<input type="text" name="verifyCode" id="verifyCode" class="inputtext validate-code" size="5" maxlength="6" />
					<img id="newVerifyCode" src="${pageContext.request.contextPath}/authImage" onclick="getNewVerifyCode()"/>
					<a href="javascript:void(0);" onclick="getNewVerifyCode()">看不清换一张？</a></td>
					<script type="text/javascript">
					    function getNewVerifyCode()
					    {
					    	$("#newVerifyCode").attr("src",$("#newVerifyCode").attr("src").split("?")[0] +"?timestamp="+ Math.random());
					    }
					</script>
				</dd>
			</dl>
			<dl>
				<dt>
					&nbsp;
				</dt>
				<dd>
					<div class="button button-mblue">
						<input type="submit" value="下一步" class="button-text">
					</div>
				</dd>
			</dl>
		</form>
    </div>
    
    <div class="clear"></div>
    
    <div>
		<jsp:include page="/footer.jsp"></jsp:include>
	</div>
</body>
</html>
